package com.example.lawyer.databind.itemview;

import android.view.View;
import android.widget.ImageView;

import androidx.databinding.BindingAdapter;
import androidx.databinding.ObservableField;

import com.bumptech.glide.Glide;

public class MessageListItemViewData {


    public ObservableField<String>  coverurl = new ObservableField<>();
    public ObservableField<String>  username = new ObservableField<>();
    public ObservableField<String>  msgtexts = new ObservableField<>();
    public ObservableField<String>  sendtime = new ObservableField<>();
    public ObservableField<Boolean>  isshow = new ObservableField<>();



    @BindingAdapter("url")
    public static void CoverUrl(View view,String url)
    {
        if(url!=null)
        {
            Glide.with(view).load(url).into((ImageView) view);
        }

    }
}
